package com.shyroke.cool.mapper;

import com.shyroke.cool.bean.ArticlePO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticlePOMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ArticlePO record);

    int insertSelective(ArticlePO record);

    ArticlePO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ArticlePO record);

    int updateByPrimaryKeyWithBLOBs(ArticlePO record);

    int updateByPrimaryKey(ArticlePO record);

    //根据labelID获取该label下有多少文章
    int countByLabelID(@Param("labelID") Integer labelID);

    //分页查询文章
    List<ArticlePO> getArticleList(@Param("beginIndex") int beginIndex, @Param("endIndex")int endIndex, @Param("labelID")String labelID);
}